﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Windows.Markup;

namespace X3D_CSharp_Class
{
    public class WorldInfo : Trans_WorldInfo
    {
        public string title { get; set; }
        public string info { get; set; }
    }

    public class Material : Mater_ImgText
    {
        public string shininess { get; set; }
        public string diffuseColor { get; set; }
        public string ambientIntensity { get; set; }
        public string containerField { get; set; }
        public string specularColor { get; set; }
        public string DEF { get; set; }
        public string USE { get; set; }
        public string emissiveColor { get; set; }
        public string transparency { get; set; }

    }

    public class ImageTexture : Mater_ImgText
    {
        public string DEF { get; set; }
        public string url { get; set; }
        public string repeatS { get; set; }
        public string repeatT { get; set; }
        public string containerField { get; set; }
    }

    public interface Mater_ImgText { }

    [ContentProperty("Mater_ImgText")]
    public class Appearance : Appear_IndexT_FaceSet
    {
        public List<Mater_ImgText> Mater_ImgText
        {
            get { return _Mater_ImgText; }
            set { _Mater_ImgText.Add(value.First()); }
        }
        private List<Mater_ImgText> _Mater_ImgText = new List<Mater_ImgText>();
        public string containerField { get; set; }
        public string DEF { get; set; }
    }
    public class Coordinate : Cor_Norm_Text
    {
        public string containerField { get; set; }
        public string point { get; set; }
        public string DEF { get; set; }
        public string USE { get; set; }

    }
    public class TextureCoordinate : Cor_Norm_Text
    {
        public string containerField { get; set; }
        public string point { get; set; }
        public string DEF { get; set; }
    }
    public class Normal : Cor_Norm_Text
    {
        public string containerField { get; set; }
        public string vector { get; set; }
        public string DEF { get; set; }
    }


    public interface Cor_Norm_Text { }
    [ContentProperty("Cor_Norm_Text")]
    public class IndexedTriangleSet : Appear_IndexT_FaceSet
    {
        public List<Cor_Norm_Text> Cor_Norm_Text
        {
            get { return _Cor_Norm_Text; }
            set { _Cor_Norm_Text.Add(value.First()); }
        }
        public bool Touchable { get; set; }
        private List<Cor_Norm_Text> _Cor_Norm_Text = new List<Cor_Norm_Text>();
        public string solid { get; set; }
        public string index { get; set; }
        public string containerField { get; set; }
    }

    [ContentProperty("Cor_Norm_Text")]
    public class IndexedFaceSet : Appear_IndexT_FaceSet
    {
        public List<Cor_Norm_Text> Cor_Norm_Text
        {
            get { return _Cor_Norm_Text; }
            set { _Cor_Norm_Text.Add(value.First()); }
        }
        private List<Cor_Norm_Text> _Cor_Norm_Text = new List<Cor_Norm_Text>();
        public string DEF { get; set; }
        public string solid { get; set; }
        public string normalPerVertex { get; set; }
        public string normalIndex { get; set; }
        public string coordIndex { get; set; }
        public string containerField { get; set; }
        public string texCoordIndex { get; set; }
        public string creaseAngle { get; set; }
        public string ccw { get; set; }
        public string USE { get; set; }        
    }
    public class Box : Appear_IndexT_FaceSet
    {
        public string DEF { get; set; }        
    }
    public interface Appear_IndexT_FaceSet { }
    [ContentProperty("Appear_IndexT")]
    public class Shape : Shape_Time_Transform, Trans_WorldInfo
    {
        public List<Appear_IndexT_FaceSet> Appear_IndexT
        {
            get { return _Appear_IndexT_FaceSet; }
            set { _Appear_IndexT_FaceSet.Add(value.First()); }
        }
        public bool Touchable { get; set; }
        private List<Appear_IndexT_FaceSet> _Appear_IndexT_FaceSet = new List<Appear_IndexT_FaceSet>();
        public string containerField { get; set; }
        public string DEF { get; set; }
    }

    public class ProximitySensor : Shape_Time_Transform
    {
        public string containerField { get; set; }
        public string size { get; set; }
        public string center { get; set; }
        public string DEF { get; set; }
        public string rotation { get; set; }
        public string scale { get; set; }
        public string translation { get; set; }
    }
    public class TimeSensor : Shape_Time_Transform , Trans_WorldInfo, Global
    {
        public string DEF { get; set; }
        public string USE { get; set; }
        public string enabled { get; set; }
        public string fraction_changed { get; set; }
        public string cycleInterval { get; set; }
        public string loop { get; set; }
        public string startTime { get; set; }
        public string stopTime { get; set; }
        public string pauseTime { get; set; }
        public string resumeTime { get; set; }
        public string cycleTime { get; set; }
        public string isActive { get; set; }
        public string isPaused { get; set; }
        public string time { get; set; }
        public string containerField { get; set; }
    }

    public class TouchSensor : Shape_Time_Transform
    {
        public bool Touchable { get; set; }
        public string DEF { get; set; }
        public string containerField { get; set; }
    }

    public class SpotLight : Shape_Time_Transform
    {
        public bool Touchable { get; set; }
        public string DEF { get; set; }
        public string containerField { get; set; }
        public string ambientIntensity { get; set; }
        public string intensity { get; set; }
        public string radius { get; set; }
        public string cutOffAngle { get; set; }
        public string beamWidth { get; set; }
        public string attenuation { get; set; }
        public string color { get; set; }
        public string on { get; set; }
    }
    public class PointLight : Shape_Time_Transform
    {
        public bool Touchable { get; set; }
        public string DEF { get; set; }
        public string containerField { get; set; }
        public string ambientIntensity { get; set; }
        public string intensity { get; set; }
        public string radius { get; set; }
        public string cutOffAngle { get; set; }
        public string beamWidth { get; set; }
        public string attenuation { get; set; }
        public string color { get; set; }
        public string on { get; set; }
    }

    public class Viewpoint : Shape_Time_Transform, Trans_WorldInfo
    {
        public string DEF { get; set; }
        public string containerField { get; set; }
        public string description { get; set; }
        public string jump { get; set; }
        public string fieldOfView { get; set; }
        public string position { get; set; }
        public string orientation { get; set; }
        public bool Touchable { get; set; }
    }

    public interface Shape_Time_Transform { }

    [ContentProperty("Shape_Time_Transform")]
    public class Transform : Trans_WorldInfo, Shape_Time_Transform
    {
        public List<Shape_Time_Transform> Shape_Time_Transform
        {
            get { return _Shape_Time_Transform; }
            set { _Shape_Time_Transform.Add(value.First()); }
        }
        private List<Shape_Time_Transform> _Shape_Time_Transform = new List<Shape_Time_Transform>();
        public string containerField { get; set; }
        public string rotation { get; set; }
        public string translation { get; set; }
        public string DEF { get; set; }
        public string scale { get; set; }
        public string center { get; set; }
        public string scaleOrientation { get; set; }
    }


    [ContentProperty("Shape_Time_Transform")]
    public class Group : Trans_WorldInfo, Shape_Time_Transform
    {
        public List<Shape_Time_Transform> Shape_Time_Transform
        {
            get { return _Shape_Time_Transform; }
            set { _Shape_Time_Transform.Add(value.First()); }
        }
        private List<Shape_Time_Transform> _Shape_Time_Transform = new List<Shape_Time_Transform>();
        public string DEF { get; set; }        
    }


    public class ROUTE : Trans_WorldInfo , Global
    {
        public string fromNode { get; set; }
        public string fromField { get; set; }
        public string toNode { get; set; }
        public string toField { get; set; }
    }
    public class PositionInterpolator : Trans_WorldInfo
    {
        public string DEF { get; set; }
        public string USE { get; set; }
        public string key { get; set; }
        public string keyValue { get; set; }
        public string set_fraction { get; set; }
        public string value_changed { get; set; }
        public string containerField { get; set; }
    }
    public class OrientationInterpolator : Trans_WorldInfo
    {
        public string DEF { get; set; }
        public string USE { get; set; }
        public string key { get; set; }
        public string keyValue { get; set; }
        public string set_fraction { get; set; }
        public string value_changed { get; set; }
        public string containerField { get; set; }
    }
    public class ColorInterpolator  : Trans_WorldInfo, Global
    {
        public string DEF { get; set; }
        public string USE { get; set; }
        public string key { get; set; }
        public string keyValue { get; set; }
        public string set_fraction { get; set; }
        public string value_changed { get; set; }
        public string containerField { get; set; }
    }    
    public interface Trans_WorldInfo { }
    [ContentProperty("Trans_Inf")]
    public class Scene : Global
    {
        public List<Trans_WorldInfo> Trans_Inf
        {
            get { return _Trans_Inf; }
            set { _Trans_Inf.Add(value.First()); }
        }
        private List<Trans_WorldInfo> _Trans_Inf = new List<Trans_WorldInfo>();
    }

    public interface Global { }
    [ContentProperty("Global")]
    public class X3D
    {
        public string profile { get; set; }
        public List<Global> Global
        {
            get { return _Global; }
            set { _Global.Add(value.First()); }
        }
        private List<Global> _Global = new List<Global>();
    }
}
